package org.hawk.gwt.ppc.parser;

import java.util.List;

/**
 * Represents try/catch/finally java construction.
 * 
 * @author alex.bereznevatiy@gmail.com
 *
 */
public interface TryCatchFinallyExpressionDescriptor extends
		ExpressionDescriptor, LabeledBlockDescriptor {
	
	/**
	 * @return try block to test to execute
	 */
	BlockDescriptor getTryBlock();
	
	/**
	 * @return list of catch clauses in order they are declared 
	 */
	List<ExpressionDescriptor> getCatchClasuses();
	
	/**
	 * @param catchClause
	 * @return catch block that follows the clause.
	 */
	BlockDescriptor getCatchBlock(ExpressionDescriptor catchClause);
	
	/**
	 * @return finally block or <code>null</code> if there isn't any.
	 */
	BlockDescriptor getFinallyBlock();

	
}
